import { UserData, UserInfo, USERS } from "../consts/auth";

export function isAuth(): boolean | UserData {
    const userString: string | null= localStorage.getItem(USERS);
    if( userString !== null){
        const useData: UserInfo = JSON.parse(userString)
        return useData;
    } 
    return false;
}